package com.mapbased.cc;

import org.dom4j.*;
import org.springframework.context.*;
import com.mapbased.wfw.*;
import com.mapbased.wfw.PageLoader.*;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2006</p>
 *
 * <p>Company: mapbased.com</p>
 *
 * @author chy_hs(Baily)
 * @version 1.0
 */
public class DefaultFeatureTable
    extends FeatureTable
{
    GlobalRef global;

    /**
     *
     * @return FeatureMeta
     * @todo Implement this com.mapbased.cc.FeatureTable method
     */
    protected ApplicationContext getApplicationContext()
    {
        return((SpringAppContext)global.getAppContext()).getApplicationContext();
    }

    /**
     * a component can choose to parse an element or not.
     *
     * @param ele Element
     * @param lc PageLoader
     * @return Element or null:if wanna page loader parse the
     *   component,return the ele, else return null
     * @todo Implement this com.mapbased.wfw.Component method
     */
    public Element parseXml(Element ele,LoadContext lc)
    {
        this.global=lc.loader.getGlobal();
        return super.parseXml(ele,lc);
    }

    /**
     *
     * @param context RenderContext
     * @todo Implement this com.mapbased.cc.FeatureTable method
     */
    protected void prepareQuery(RenderContext context)
    {
    }
}
